<div class="componentheading"><?php echo $page_title;?></div>
<div><?php global_message(); ?></div>
<?php
	$isEdit = isset($_location) ? true : false;
	$text = empty($isEdit) ? 'Add' : 'Update';
	$selected = 'selected = "selected"';
?>
<form method="post" id="newForm">
<div class="box-header"></div>
<div class="box table">
<table width="100%">
    <tr>
    	<td><strong>Locations Name</strong></td>
        <td><input type="text" class="required" name="location_name" id="location_name" value="<?php if($isEdit) echo $_location->location_name;?>" /></td>
    </tr>
    <!--<tr>
    	<td><strong>Code</strong></td>
        <td><input type="text" class="required" name="code" id="code" value="<?php if($isEdit) echo $_location->code;?>"></td>
    </tr>-->
    <tr>
    	<td>&nbsp;</td>
        <td>
        	<input type="submit" name="submit_location" id="submit_location" value="<?php echo $text;?>">
            <input type="button" onclick="window.location.href = '<?php echo site_url('locations');?>'" value="Back" />
        </td>
    </tr>
</table>
</div>
</form>
<script>
$(document).ready(function(){
	//initialize jquery validation
	$('#newForm').validate();
								
	});

</script>
